CXX=g++
#CXXFLAGS=-O3 -funroll-loops -fprofile-use
#CXXFLAGS=-pg -O0
CXXFLAGS=-march=native -O2 -pipe
WARN=-Wall -ansi -pedantic -Weffc++
.PHONY: default all clean distclean
default: fischer
all: fischer pgn2book open.book
fischer: main.cc board.h engine.h brain.h opening.h hashtable.h eval.h
	$(CXX) $(CXXFLAGS) $(WARN) $< -o $@
pgn2book: pgn2book.cc board.h engine.h
	$(CXX) $(CXXFLAGS) $(WARN) $< -o $@
open.book: pgn2book book.pgn
	./pgn2book
clean:
	$(RM) *~ fischer pgn2book
distclean: clean
	$(RM) open.book
